import request from '@/utils/request'

// 获取经纪列表
export function agentsList(params) {
  return request({
    url: '/agents',
    method: 'get',
    params
  })
}

// 获取经纪列表数量
export function agentsCount(params) {
  return request({
    url: '/agents/count',
    method: 'get',
    params
  })
}

// 添加经纪
export function addAgents(data) {
  return request({
    url: '/agents',
    method: 'post',
    data
  })
}

// 删除经纪
export function deleteAgents(id) {
  return request({
    url: '/agents/' + id,
    method: 'DELETE'
  })
}

// 获取指定经纪
export function assignAgents(id) {
  return request({
    url: '/agents/' + id,
    method: 'get'
  })
}

// 编辑经纪
export function editAgents(data) {
  return request({
    url: '/agents/' + data.id,
    method: 'put',
    data
  })
}

